export function validPhone(phone) {
  if (phone == '') return false
  var pattern =/^1[3456789]\d{9}$/;
  return pattern.test(phone);
}

export function validCardNo(card) {
  if (!card) return false
  var reg = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
  return reg.test(card);
}

export function validEmail(email) {
  if (!email) return false
  const reg = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  return reg.test(email);
}